-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Universal Assisted Model #90
Conversation
Job PR-90-252636c is done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Sorry for the delayed review.
if self.assistant_tokenizer_name: | ||
assistant_tokenizer = AutoTokenizer.from_pretrained(self.assistant_tokenizer_name) | ||
self.hf_generate_params["assistant_tokenizer"] = assistant_tokenizer | ||
self.hf_generate_params["tokenizer"] = self.tokenizer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be more logical to move Line 93 out of the if
statement and place after Line 81?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this line is usually not needed, but it is compulsory if there is an assistant tokenizer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK that makes sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Description
[Provide a brief description of the changes in this PR]
PR to support universal assisted model, see https://huggingface.co/docs/transformers/main/en/generation_strategies#universal-assisted-decoding for more details.
Related Issue
[Link to the related issue, if applicable]
Type of Change
Checklist
Additional Information
[Any additional information, configuration, or data that might be necessary to reproduce the issue or test the PR]
Screenshots (if appropriate)
[Add screenshots to help explain your changes]
Performance Impact
[Describe any performance impact this change may have]
Backwards Compatibility
[Describe any backwards incompatible changes and how you've addressed them]
Dependency Changes
[List any new dependencies introduced or removed]
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.